/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Figuras;

import java.awt.Color;
import java.awt.Graphics;

/**
 *
 * @author Administrador
 */
public class Bala extends Figura {

    public Bala(Integer x0, Integer y0, Integer w0, Integer h0, Color c,
        Lienzo l){
        super(x0,y0,w0,h0,c,l);
        vida=1;
    }

    @Override
    public void dibujate(Graphics g) {
        g.setColor(color);
        g.fillRect(x, y, w, h);
    }

    @Override
    public void colisionoCon(CirculoBomba c) {
    }

    @Override
    public void colisionoCon(Cuadrilatero c) {
    }

    @Override
    public void colisionoCon(Figura c) {
        c.colisionoCon(this);
    }

    @Override
    public void colisionoCon(Pared c) {
        this.pierdeVida(-1);
    }

    @Override
    public void colisionoCon(Bala c) {
    }

    @Override
    public void colisionoCon(Movil c) {
        c.pierdeVida(-1);
    }

    @Override
    public void colisionoCon(ParedH c) {
        this.pierdeVida(-1);
    }

    @Override
    public void colisionoCon(ParedV c) {
        this.pierdeVida(-1);
        
    }
    @Override
    public String toString(){
        return "Bala "+super.toString();
    }

    @Override
    public void colisionoCon(CirculoVida c) {
    }

}
